﻿using Renci.SshNet.Sftp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LSFTP.model
{
    public class FTPFileInfo
    {
        /// <summary>
        /// 文件名
        /// </summary>
        public string Name;
        /// <summary>
        /// 全名
        /// </summary>
        public string FullName;
        /// <summary>
        /// 文件大小
        /// </summary>
        public long Length;
        /// <summary>
        /// 是否是文件夹
        /// </summary>
        public bool IsDirectory;
        /// <summary>
        /// 最后访问时间
        /// </summary>
        public DateTime LastAccessTime;
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime LastWriteTime;

        public FTPFileInfo() { }

        public FTPFileInfo(SftpFile info)
        {
            Name = info.Name;
            FullName = info.FullName;
            Length = info.Length;
            IsDirectory = info.IsDirectory;
            LastAccessTime = info.LastAccessTime;
            LastWriteTime = info.LastWriteTime;
        }
    }
}
